Subarray Sums Divisible By K - Leetcode 974 - Python